package com.atguigu.spzx.cloud.order.controller;

import com.atguigu.spzx.cloud.model.entity.Order;
import com.atguigu.spzx.cloud.order.service.api.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/order")
public class OrderController {
	@Autowired
	OrderService orderService;

	@GetMapping("/findOrderByOrderId/{orderId}")
	public Order findOrderByOrderId(@PathVariable("orderId") Long orderId ) {
		return orderService.getOrderByOrderId(orderId);
	}
}
